<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
  <head>    
    <title></title>
  </head>
  <body>
  <%!
  	int number=0;
  	synchronized void count(){
  		number++;
  	}
   %>
   <%
   		if(session.isNew()){
   			count();
   			String str=String.valueOf(number);
   			session.setAttribute("num", str);
   		}
    %>
    <p>欢迎访问本网站，你是第<%=(String)session.getAttribute("num")%>个访问本网站的人</p>
  </body>
</html>



